#include "XmlUtils.hpp"

using namespace rapidxml;

std::string efs::XmlToString(xml_document<> const &xml)
{
	std::string xml_string;
	rapidxml::print(std::back_inserter(xml_string), xml);
	return xml_string;
}

/*
bool efs::stringToXml(std::string const& xml_string, rapidxml::xml_document<> &xml)
{
	xml.clear();
	std::vector<char> xml_vector(xml_string.begin(), xml_string.end());
	xml_vector.push_back('\0');
	try
	{
		xml.parse<rapidxml::parse_declaration_node | rapidxml::parse_no_data_nodes>(&xml_vector[0]);
	}
	catch(...)
	{
		return false;
	}
	return true;
}

*/
